// *** ADDED BY HEADER FIXUP ***
#include <wx/gdicmn.h>
#include <wx/string.h>
#include <wx/validate.h>
#include <wx/window.h>
// *** END ***
#ifndef TEXTLOG_H_INCLUDED
#define TEXTLOG_H_INCLUDED

#include <wx/textctrl.h>
#include <wx/datetime.h>
#include <wx/thread.h>
#include <map>
#include <vector>
using namespace std;
/** \brief 显示聊天对白的文本框
 *
 *  继承自wxTextCtrl
 */

class TextLog:public wxTextCtrl
{
public:

    /** \brief 构造函数
     *
     * \param parent 父窗口
     * \param id 组件ID
     * \return
     *
     */
    TextLog(wxWindow* parent, wxWindowID id,const wxString value,
            const wxPoint& pos, const wxSize& size,
            long style, const wxValidator& validator,
            const wxString& name);

    /** \brief 添加聊天记录
     *
     * \param name 说话人
     * \param msg 说话内容
     * \return
     *
     */

    void AddLog(const wxString name,const wxString msg);

    /** \brief 获取name说的最后一句话
     *
     */

    wxString LastMsg(wxString name);
private:
    map<wxString,vector<wxString> >log;
};

#endif // TEXTLOG_H_INCLUDED
